package dialer.ws.base.entity.vtelcom;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Formulary entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "formulary", schema = "vtelcom_call_center")
public class Formulary implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7241227284553233813L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false)
	private Integer id;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_master")
	private Master master;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_status", nullable = false)
	private Status status;

	@Column(name = "name", nullable = false)
	private String name;
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "formulary")
	private List<FormularyDetail> listFormularyDetail;

	/** default constructor */
	public Formulary() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Master getMaster() {
		return master;
	}

	public void setMaster(Master master) {
		this.master = master;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<FormularyDetail> getListFormularyDetail() {
		return listFormularyDetail;
	}

	public void setListFormularyDetail(List<FormularyDetail> listFormularyDetail) {
		this.listFormularyDetail = listFormularyDetail;
	}

}